﻿@model Irandeb4.Models.Item

<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Item</legend>
        <table>
        <tr>
            <td class="editor-label">
                @Html.LabelFor(model => model.ProductId)
            </td>
            <td class="editor-field">
                @Html.DropDownListFor(model => model.ProductId, new SelectList(ViewBag.Product,"ProductId", "Name"))
                @Html.ValidationMessageFor(model => model.ProductId)
            </td>

            <td class="editor-label">
                @Html.LabelFor(model => model.Amount)
            </td>
            <td class="editor-field">
                @Html.EditorFor(model => model.Amount)
                @Html.ValidationMessageFor(model => model.Amount)
            </td>

            <td class="editor-label">
                @Html.LabelFor(model => model.Description)
            </td>
            <td class="editor-field">
                @Html.EditorFor(model => model.Description)
                @Html.ValidationMessageFor(model => model.Description)
            </td>
        </tr>
    </table>
    </fieldset>
}

